home *** CD-ROM | disk | FTP | other *** search
- Path: news.telepac.pt!usenet
- From: jcarlosr@mail.telepac.pt (J.Carlos)
- Newsgroups: comp.lang.c++
- Subject: Re: NEWBIE QUE.: Compiler calling the wrong function???
- Date: Sat, 09 Mar 1996 15:34:48 GMT
- Organization: telepac
- Message-ID: <4hscga$8tj@vivaldi.telepac.pt>
- References: <960302.203405.15824@banshee.uunet.ca>
- NNTP-Posting-Host: alv1_p9.telepac.pt
- X-Newsreader: Forte Free Agent 1.0.82
-
- ffisl@travel-net.com (Frantisek Fisl) wrote:
-
- >When I compile a file containing the following code, I get this error message:
- >error C2660: 'GetDlgItem' : function does not take 1 parameters
- >void CPlmwinDoc::OnInputBmpNew()
- >{
- >// HERE'S WHERE THE ERROR OCCURS:
- > itemIndex = ((CComboBox *)GetDlgItem(IDC_BMP))->GetCurSel();
- > ((CComboBox *)GetDlgItem (IDC_BMP))->GetLBText(itemIndex, PTypeText);
- >}
- This is a MFC question, not a C++ one ... , anyway,
- The problem is that MFC's GetDlgItem is a member of CWnd
- (or CView...) class, not CDocument, so you must call GetDlgItem in the
- view class or get a pointer to the view in the document class to call
- it (check GetNextView() function in MFC documentation).
- Regards, J.Carlos
-
-
-